<?php
namespace app\validate;

use think\Validate;

class ClubValidate extends Validate
{
    protected $rule = [
        'name'        => 'require|max:100',
        'description' => 'max:255',
        'teacher_id'  => 'require|integer'
    ];

    protected $message = [
        'name.require'        => '社团名称不能为空',
        'name.max'            => '社团名称不能超过100个字符',
        'description.max'     => '描述不能超过255个字符',
        'teacher_id.require'  => '指导老师ID不能为空',
        'teacher_id.integer'  => '指导老师ID必须为整数'
    ];
}
